package org.csmzxy.class2333;

public class 多维数组动态初始化 {
    public static void main(String[] args){
        int[][] arr1 = new int[3][];
        for (int i = 0; i < arr1.length; i++){
            arr1[i] = new int[i+1]; //开辟空间
            for (int j = 0; j <arr1[i].length; j++){
                arr1[i][j] = i+1 ;
            }
        }
        for(int i = 0; i < arr1.length; i++){
            for(int j = 0; j < arr1[i].length; j++){
                System.out.print(arr1[i][j]);
            }
            System.out.println();
        }
    }
}
